// License Notification
//======================================================
// Copyright (c) 2010 Channel Intelligence Inc.
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// which accompanies this distribution, and is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// ======================================================




using System;
using System.Collections.Generic;
using CIP4.Item;

namespace CIP4.Common
{
    public interface ISerializerType
    {
        object GetDataForObject(object forObject);
        object GetObjectForData(object data);
        ExternalIDType GetExternalID(object forObject);
        object GetValueForSimpleValue(object valueObject, string typeName, OtherConverterDelegate otherConverter);
        object GetValueForPath(object item, string path);
        IEnumerable<KeyValuePair<string, int>> GetKeys();
        bool CheckVersion{ get; }
        Int64 GetVersionNumber(object item);
        void SetVersionNumber(object item, Int64 value);
        CIP4ItemAttribute ItemAttribute { get; }
        Dictionary<string, KeyValuePair<System.Reflection.PropertyInfo, object>> StreamSeeds { get; set; }
        Type TargetType { get; }
        LoggerDelegate Logger { get; }
        void PushLogger(LoggerDelegate logger);
        void PopLogger();
        Type SerializerType { get; }
        object GetItemVersion(long versionTimestamp, object previousVersion, Dictionary<string, object> values);
    }

    public delegate object OtherConverterDelegate(string stringFormOfTheValue);

}
